home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
2510.ZIP
/
TRSOURCE.EXE
/
_TR_ERRS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
1KB
|
41 lines
/*********
* Function: _tr_errmsgs
*
* By: Tom Rettig
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* char *_tr_errmsgs( (char*)calling function name, (int)message index )
*
* runtime error messages for functions returning <expC>
*
* calling function must pass its own name
*
*********/
#include "trlib.h"
char *_tr_errmsgs( funcname, message )
char *funcname;
int message;
{
static char *errmsg[] =
{ "TRLIB ERROR: ", /* prefix to all other errors */
" SYNTAX",
" ALLOCATING MEMORY",
" OPENING FILE",
" SEEKING FILE POSITION",
" READING FILE",
" WRITING FILE",
" CLOSING FILE"
};
static char tempbuff[64] = " "; /* max error msg len is 63 including funcname */
char *tp;
tp = tempbuff;
tp = _tr_strcpy( tp, errmsg[E_PREFIX] );
tp = _tr_strcat( tp, funcname );
return( _tr_strcat(tp,errmsg[message]) );
}